import type {Action, CounterState} from "./state.ts";
import {createContext, type Dispatch} from "react";

type CounterContextType = {
    state: CounterState
    dispatch: Dispatch<Action>
}

export const CounterContext =
    createContext<CounterContextType | undefined>(undefined);